package com.xc.taoku.vo;

import com.xc.taoku.entity.Product;
import lombok.Data;

import java.util.Comparator;

//dto

@Data
public class CartVo {

    Product product;
    int count;


    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;};
        if (o == null || getClass() != o.getClass()){ return false;};

        CartVo cartVo = (CartVo) o;

        return product != null ? product.equals(cartVo.product) : cartVo.product == null;
    }

}
